<template>
 <div class="tabbar">
         <!-- 底部标签栏 -->
    <van-tabbar v-model="active" active-color="#ee0a24" inactive-color="#666">
      <van-tabbar-item icon="wap-home-o" to="/">首页</van-tabbar-item>
      <van-tabbar-item icon="hotel-o" to="/house">找房</van-tabbar-item>
      <van-tabbar-item icon="eye-o" to="/find">发现</van-tabbar-item>
      <van-tabbar-item icon="manager-o" to="/user">我的</van-tabbar-item>
    </van-tabbar>
 </div>
</template>
 
<script>
export default {
  data() {
    return {
      // active: 0,
    };
  },
  computed:{
    active:{
      get(){
        switch (this.$route.path) {
        case '/':
          return 0;
        case '/house':
          return 1;
        case '/find':
          return 2;
        case '/user':
          return 3;
        default:
          break;
      }
      },
      set(){}
    }
  }
};
</script>
 
<style scoped>
</style>